package com.zzsy.shoppingpro.community.fragment;

import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.ImageButton;

import com.zzsy.shoppingpro.R;
import com.zzsy.shoppingpro.base.BaseFragment;
import com.zzsy.shoppingpro.community.adapter.CommunityViewPagerAdapter;

/**
 * Created by Administrator on 2019/8/17 0017.
 */

public class CommunityFragment extends BaseFragment{
    private ImageButton ibCommunityIcon;
    private TabLayout tablayout;
    private ViewPager viewPager;
    private ImageButton ibCommunityMessage;

    @Override
    public View initView() {
        View view = View.inflate(context, R.layout.fragment_community, null);
        ibCommunityIcon =  view.findViewById(R.id.id_community_icon);
        tablayout =  view.findViewById(R.id.tablayout);
        viewPager =  view.findViewById(R.id.view_pager);
        ibCommunityMessage =  view.findViewById(R.id.ib_community_message);

        CommunityViewPagerAdapter communityViewPagerAdapter = new CommunityViewPagerAdapter(getFragmentManager());
        viewPager.setAdapter(communityViewPagerAdapter);
        tablayout.setVisibility(View.VISIBLE);
        tablayout.setupWithViewPager(viewPager);
        return view;
    }

    /**
     * 网络请求的数据
     * */
    @Override
    public void initData() {

    }

}
